Moves by (dx, dy) against the current room’s own collision AND the live SOLID instances of the objects you name, all tested together in one pass - the corner-nudge slide works against these object types too, not just the room’s own tile layer/obstacles. Name as many objects as you like: move_slide_solid(dx, dy, obj_wall, obj_rock). A parent object also covers all of its children.
move_slide_solid(dx, dy, obj, ...more)| Name | Type |
|---|---|
dx | real |
dy | real |
obj | object |
...more | object (any number of them, none included) |
Nothing.
Moves by (dx, dy) against the CURRENT room's own collision AND the live solid instances of the objects you name, all tested together in ONE pass - the same corner-nudge slide move_slide already gives against the room's own tile layer/obstacles, now also working against these object types.
Reach for this instead of gating move_slide yourself with three pos_free checks first, one per axis. Deciding "blocked" outside the call and handing move_slide an already-zeroed dx/dy gives the same BLOCKING answer, but never lets the corner-nudge fire - its corner probes only run from inside move_slide's own "was this blocked" branch, which a pre-zeroed delta never reaches.
Name as many objects as you like, one or more: move_slide_solid(dx, dy, obj_wall) or move_slide_solid(dx, dy, obj_wall, obj_rock, obj_lock, obj_crate). The names are written out, the same as pos_free's own obj - they cannot be held in a variable.
A parent's name covers its children, exactly as it does in pos_free: with obj_enemy as the parent of obj_slime, a solid slime blocks you like a solid obj_enemy. A name given twice, or a child named beside its own parent, is tested once. The instance that is moving never blocks itself, even if its own object is one of the names.
All the objects you name, counted with their children, can hold at most 64 instances between them. Past that the check says so before the game is built: lower the Max instances of the ones that need fewer, name fewer, or tick Never moves on a wall that never moves (it is not counted).
For any of the three whose Never moves box is ticked, the walker asks that object's look-up grid instead of gathering its copies one by one each frame; the slide, the corner nudge and the result are the same (Never moves).
move_slide_solid(btn_dx() * 2, btn_dy() * 2, obj_doc_wall, obj_doc_rock, obj_doc_lock);Moves the walker by up to 2 pixels on each axis from the d-pad every step, sliding along - and nudging around the corner of - the room's own collision or a solid obj_doc_wall, obj_doc_rock or obj_doc_lock instance.
Any number of object names, one or more. Each one stands for itself AND every object that has it as a parent (like pos_free’s own `obj`), and a name given twice - or a child named beside its own parent - is tested once. The instance that is moving never blocks itself, even when its own object is one of the names you gave. The objects’ pools are compile-time template arguments, so the names must be written out, not held in a variable. All the objects you name together can hold at most 64 instances at once (the lists add up; an object ticked Never moves does not count): past that the build stops with a message saying to lower an object’s Max instances, name fewer objects, or raise the limit - walls would otherwise silently stop blocking. Testing each type SEPARATELY instead (three pos_free() checks deciding "blocked" before ever calling move_slide) looks equivalent but is not: it defeats the corner-nudge, because resolve_move’s corner probes only run from inside its own "was this blocked" branch, never reached once a caller has already zeroed dx/dy for it. A linear scan of each of a/b/c’s own pool, same "pools are small" reasoning pos_free already relies on - not something to call from many instances at once every frame without thinking about it. An object whose Never moves box is ticked is answered from a lookup grid instead (same answer).